import sympy as sp

x = sp.symbols('x')
y = sp.Function('y')
eq = sp.Eq(y(x).diff(x), y(x)/x)
# 定义初值条件：当x=1时，y=2
solution = sp.dsolve(eq, ics={y(1): 2})
print(solution)